# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Metastore.V1.Model.Consumer do
  @moduledoc """
  Contains information of the customer's network configurations.

  ## Attributes

  *   `endpointLocation` (*type:* `String.t`, *default:* `nil`) - Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.
  *   `endpointUri` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the endpoint used to access the metastore service.
  *   `subnetwork` (*type:* `String.t`, *default:* `nil`) - Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :endpointLocation => String.t() | nil,
          :endpointUri => String.t() | nil,
          :subnetwork => String.t() | nil
        }

  field(:endpointLocation)
  field(:endpointUri)
  field(:subnetwork)
end

defimpl Poison.Decoder, for: GoogleApi.Metastore.V1.Model.Consumer do
  def decode(value, options) do
    GoogleApi.Metastore.V1.Model.Consumer.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Metastore.V1.Model.Consumer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
